<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <Link Rel="ICON NAME" href="/static/index/img/ico.jpg">
    <link rel="stylesheet" href="/static/adminLogin/css/amazeui.css">
    <link rel="stylesheet" href="/static/adminLogin/css/font-awesome.min.css"/>
    <title>登录</title>
</head>
<body style="background: url('/static/adminLogin/image/company_profile_bg.png'); background-repeat: no-repeat; background-size: 100% 100%">
<div style="position: absolute; width: 400px; margin: 0 auto; text-align: center; top: 45%; margin-top: -200px; left: 50%; margin-left: -200px;">
    <div style="height:235px;margin-bottom: 20px;">
        <img src="/static/adminLogin/image/old.png" height="100%">
    </div>
    <div class="am-input-group" style="margin-left: 40px;width:350px">
        <span class="am-input-group-label"style="width:43px;padding:0;height: 43px;background:#fbdcbf;line-height: 8px">
            <i class="am-icon-user am-icon-fw" style="font-size:23px"></i>
        </span>
        <input class="username am-form-field" type="text" name="username" style="border: 1px solid #e3e0c3; height: 43px; text-indent: 5px; width:298px;" />
    </div>
    <div class="am-input-group" style="margin-left: 40px;margin-top:6px;width:341px">
        <span class="am-input-group-label"style="width:43px;padding:0;height: 43px;background:#fbdcbf;line-height: 8px">
            <i class="fa fa-lock" style="font-size:23px"></i>
        </span>
        <input class="password" type="password" name="password" style="border: 1px solid #e3e0c3; height: 43px; text-indent: 5px; width:298px;" />
    </div>
    <input class="submit_btn" type="submit" value="登录" style="width: 80px; height: 40px; color: white; background: #947566; border: none; border: 1px solid #947566; border-radius: 5px; margin-top: 16px;font-size:18px">
</div>
<script src='/static/index/js/jquery-1.11.0.min.js'></script>
<script>

    $('body').height( $(window).height());

    $('.submit_btn').click(function(){
        var user=$('.username').val().trim();
        var pwd=$('.password').val().trim();
        $.post('{:url("admin/Login/toLogin")}',{user:user,pwd:pwd},function(res){
            var res=JSON.parse(res)
            if(res=='登录成功'){
                window.location.href='{:url("admin/index/main")}';
            }else{
                alert(res);
            }
        })
    })
</script>
</body>
</html>